package com.foruo.demo.spring.scan;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = DemoConfig.class)
public class DemoTest {

    @Autowired
    DemoEntity demoEntity;

    @Autowired
    @Qualifier("gunEntity")
    IToolEntity toolEntity;


    @Test
    public void testMe(){
        demoEntity.show();
        // 如期打印 - 我是高元,我今年18岁
        toolEntity.use();
    }

}
